#!/usr/bin/env bash

echo "将安装 JDK1.8,Maven3.6,Docker最新版  ---->>>"
echo "安装依赖包..."
apt-get install -y wget curl git vim apt-utils daemon psmisc net-tools apt-transport-https ca-certificates  software-properties-common

echo "添加源..."
wget  https://gitee.com/imnewsea/docker/raw/master/env/aliyun-ubuntu-$(cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -d "=" -f 2).source -O  /etc/apt/sources.list


echo "升级系统..."
apt-get clean all
apt-get update
apt-get upgrade -y

chmod a+rw -R /opt/


wget -q -O - https://gitee.com/imnewsea/docker/raw/master/env/jdk.sh | bash
wget -q -O - https://gitee.com/imnewsea/docker/raw/master/env/maven.sh | bash
wget -q -O - https://gitee.com/imnewsea/docker/raw/master/env/node-js.sh | bash
wget -q -O - https://gitee.com/imnewsea/docker/raw/master/env/python3.sh | bash

# 不推荐安装最新版
# curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

# 安装docker指定版本
wget -q -O - https://gitee.com/imnewsea/docker/raw/master/env/docker.sh | bash



echo "完成。"
#使用方法
# 首先安装 curl  , 设置 root 密码： sudo passwd root , 以 root 执行： su .

# curl -fsSL https://gitee.com/imnewsea/docker/raw/master/server/ubuntu.sh | bash